using RAG.Domain.Entities.App;

namespace RAG.Domain.Repositories;

/// <summary>
/// 用户仓储接口
/// </summary>
public interface IUserRepository
{
    /// <summary>
    /// 根据ID获取用户
    /// </summary>
    /// <param name="id">用户ID</param>
    /// <returns>用户实体</returns>
    Task<Users?> GetByIdAsync(Guid id);

    /// <summary>
    /// 根据用户名获取用户
    /// </summary>
    /// <param name="userName">用户名</param>
    /// <returns>用户实体</returns>
    Task<Users?> GetByUserNameAsync(string userName);

    /// <summary>
    /// 根据邮箱获取用户
    /// </summary>
    /// <param name="email">邮箱</param>
    /// <returns>用户实体</returns>
    Task<Users?> GetByEmailAsync(string email);

    /// <summary>
    /// 创建用户
    /// </summary>
    /// <param name="user">用户实体</param>
    /// <returns>创建的用户</returns>
    Task<Users> CreateAsync(Users user);

    /// <summary>
    /// 更新用户
    /// </summary>
    /// <param name="user">用户实体</param>
    /// <returns>更新的用户</returns>
    Task<Users> UpdateAsync(Users user);

    /// <summary>
    /// 删除用户
    /// </summary>
    /// <param name="id">用户ID</param>
    Task DeleteAsync(Guid id);

    /// <summary>
    /// 获取所有用户
    /// </summary>
    /// <returns>用户列表</returns>
    Task<List<Users>> GetAllAsync();
}
